<?php
define('BASEDIR', './');
require BASEDIR . 'bin.php';

TrafficSessionManager::init();
$zones = TrafficSessionManager::$zones;
TrafficSessionManager::setIsInTransaction(null);
TrafficSessionManager::store();

?><script type="text/javascript">
	$(function() {
		$('.maplink').mouseenter(function(){
			$('#zone').html($(this).html());
		}).mouseleave(function(){
			$('#zone').html('');
		});
		<?php foreach($zones as $zone) { ?>
			$("#<?php echo $zone->id; ?>").hide();
		<?php } ?>
		updateRdv(initial_time_mytho + game_current_time_stamp);
	});
</script>
<div class="map">
	<h2>Carte du secteur</h2>
	<dl class="image_map"><?php
		foreach($zones as $zone) {
			$style = 'left:' . $zone->x . 'px; top:' . $zone->y . 'px; width:17px; padding-top:17px; background: url(images/user.png) no-repeat;';
			?><dd id="<?php echo $zone->id; ?>">
				<a class="maplink" style="<?php echo $style; ?>" href="javascript:;"><?php echo $zone->name; ?></a>
			</dd><?php
		}

	?></dl>
	<br />
	<div id="zone" style="text-align:center; margin-left:auto; margin-right:auto; width:358px;">
	</div>
</div>